home *** CD-ROM | disk | FTP | other *** search
/ PC User 2002 March / Disc 1 / PCU030201.iso / software / apps / files / ftptrees.exe / DISK1 / _SETUP.1 / NewFolder.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1997-09-30  |  2.1 KB  |  68 lines

  1. VERSION 5.00
  2. Begin VB.Form NewFolder 
  3.    Caption         =   "New Folder"
  4.    ClientHeight    =   2040
  5.    ClientLeft      =   60
  6.    ClientTop       =   345
  7.    ClientWidth     =   3705
  8.    Icon            =   "NewFolder.frx":0000
  9.    LinkTopic       =   "Form2"
  10.    ScaleHeight     =   2040
  11.    ScaleWidth      =   3705
  12.    StartUpPosition =   3  'Windows Default
  13.    Begin VB.CommandButton Cancel 
  14.       Caption         =   "Cancel"
  15.       Height          =   375
  16.       Left            =   2400
  17.       TabIndex        =   3
  18.       Top             =   1560
  19.       Width           =   1095
  20.    End
  21.    Begin VB.CommandButton OK 
  22.       Caption         =   "OK"
  23.       Height          =   375
  24.       Left            =   2400
  25.       TabIndex        =   2
  26.       Top             =   1080
  27.       Width           =   1095
  28.    End
  29.    Begin VB.TextBox NewName 
  30.       Height          =   375
  31.       Left            =   120
  32.       TabIndex        =   1
  33.       Top             =   480
  34.       Width           =   3375
  35.    End
  36.    Begin VB.Label Label1 
  37.       Caption         =   "&New Folder Name:"
  38.       Height          =   255
  39.       Left            =   120
  40.       TabIndex        =   0
  41.       Top             =   240
  42.       Width           =   1455
  43.    End
  44. Attribute VB_Name = "NewFolder"
  45. Attribute VB_GlobalNameSpace = False
  46. Attribute VB_Creatable = False
  47. Attribute VB_PredeclaredId = True
  48. Attribute VB_Exposed = False
  49. Private Sub Cancel_Click()
  50.     ' we're done, so unload the form
  51.     Unload Me
  52. End Sub
  53. Private Sub OK_Click()
  54.     ' make sure we have an item selected first
  55.     If Not Form1.FtpTree1.SelItem Is Nothing Then
  56.         ' try to create the folder
  57.         Ret = Form1.FtpTree1.SelItem.CreateDirWithName(NewName)
  58.         ' if unable to create the folder, display an error message
  59.         If Not Ret Then
  60.             MsgBox "Error Creating: " + NewName, vbExclamation, "FtpTree ActiveX Control VB Sample"
  61.         Else
  62.             Unload Me
  63.         End If
  64.     Else
  65.         MsgBox "Please select a parent folder before using this option.", , "FtpTree ActiveX Control VB Sample"
  66.     End If
  67. End Sub
  68.